/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import org.apache.struts2.json.annotations.JSON;

/**
 *
 * @author ylz
 */
@Entity
@Table(name = "news_k16titletoother")
//@NamedQueries({@NamedQuery(name = "NewsK16TitleToOther.findAll", query = "SELECT n FROM NewsK16TitleToOther n"), @NamedQuery(name = "NewsK16TitleToOther.findByCid", query = "SELECT n FROM NewsK16TitleToOther n WHERE n.cid = :cid")})
public class NewsK16TitleToOther implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "cid")
    private Integer cid;
    @Column(name = "ctype")
    private Integer ctype;
    @Column(name = "cparam1")
    private String cparam1;
    @Column(name = "cparam2")
	private String cparam2;
    @Column(name = "flag")
	private Integer flag;
    @Column(name = "note")
    private String note;
	private String contentName;					//内容名称
	private Date updatetime;				//最后更新时间

	public NewsK16TitleToOther() {
    }

    public NewsK16TitleToOther(Integer cid) {
        this.cid = cid;
    }
    
	@Override
    public int hashCode() {
        int hash = 0;
        hash += (cid != null ? cid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the cid fields are not set
        if (!(object instanceof NewsK16TitleToOther)) {
            return false;
        }
        NewsK16TitleToOther other = (NewsK16TitleToOther) object;
        if ((this.cid == null && other.cid != null) || (this.cid != null && !this.cid.equals(other.cid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsK16TitleToOther[cid=" + cid + "]";
    }

	public Integer getCid() {
		return cid;
	}

	public void setCid(Integer cid) {
		this.cid = cid;
	}

	public Integer getCtype() {
		return ctype;
	}

	public void setCtype(Integer ctype) {
		this.ctype = ctype;
	}

	public String getCparam1() {
		return cparam1;
	}

	public void setCparam1(String cparam1) {
		this.cparam1 = cparam1;
	}

	public String getCparam2() {
		return cparam2;
	}

	public void setCparam2(String cparam2) {
		this.cparam2 = cparam2;
	}
    
    public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getContentName() {
		return contentName;
	}

	public void setContentName(String contentName) {
		this.contentName = contentName;
	}

	@JSON(format="yyyy-MM-dd HH:mm:ss")
	public Date getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

}
